_id; })
-static void dbg_network_int(int irq, void *dev_id, struct pt_regs *ptregs)
+static void _dbg_network_int(struct net_device *dev)
{
- struct net_device *dev = (struct net_device *)dev_id;
struct net_private *np = dev->priv;
+
+ if ( np->state == STATE_CLOSED )
+ return;
+
printk(KERN_ALERT "tx_full = %d, tx_entries = %d, tx_resp_cons = %d,"
" tx_req_prod = %d, tx_resp_prod = %d, tx_event = %d, state=%d\n",
np->tx_full, atomic_read(&np->tx_entries), np->tx_resp_cons,
}
+static void dbg_network_int(int irq, void *unused, struct pt_regs *ptregs)
+{
+ struct list_head *ent;
+ struct net_private *np;
+ list_for_each ( ent, &dev_list )
+ {
+ np = list_entry(ent, struct net_private, list);
+ _dbg_network_int(np->dev);
+ }
+}
+
+
static int network_open(struct net_device *dev)
{
struct net_private *np = dev->priv;
#include <asm/hypervisor.h>
#include <asm/hypervisor-ifs/dom0_ops.h>
#include <linux/netdevice.h>
+#include <linux/rtnetlink.h>
#include <linux/tqueue.h>
/*
char name[6];
int i;
- /* Close down all Ethernet interfaces. */
+ rtnl_lock();
for ( i = 0; i < 10; i++ )
{
sprintf(name, "eth%d", i);
- if ( (dev = dev_get_by_name(name)) == NULL )
- continue;
- dev_close(dev);
- dev_put(dev);
+ if ( (dev = __dev_get_by_name(name)) != NULL )
+ dev_close(dev);
}
+ rtnl_unlock();
blkdev_suspend();
blkdev_resume();
- /* Bring up all Ethernet interfaces. */
+ rtnl_lock();
for ( i = 0; i < 10; i++ )
{
sprintf(name, "eth%d", i);
- if ( (dev = dev_get_by_name(name)) == NULL )
- continue;
- dev_open(dev);
- dev_put(dev);
+ if ( (dev = __dev_get_by_name(name)) != NULL )
+ dev_open(dev);
}
+ rtnl_unlock();
}
static struct tq_struct stop_tq;